package com.zhanghe.study.design_pattern.singleton_pattern.hungry;

/**
 * 饿汉模式
 * @Author: zhanghe
 * @Date: 2020/4/21 17:45
 */
public class Singleton {
    // 类加载的时候进行实例化
    private static final Singleton instance = new Singleton();

    private Singleton(){

    }

    public static Singleton newInstance(){
        return instance;
    }
}
